<template>
  <div class="detail-dialog w-full h-full display-flex-column" style="overflow: hidden">
    <div class="btn-box display-flex" style="justify-content: flex-start">
      <a-button @click="handlerCopy">点击复制</a-button>
    </div>
    <div class="w-full" style="height: 10px;"></div>
    <div class="w-full flex-1" style="overflow:auto;">
      {{ detailValue }}
    </div>
  </div>
</template>
<script>
export default {
  name: 'DetailDialog',
  props: {
    detailValue: {
      type: String,
      defaultValue: ''
    }
  },
  data () {
    return {}
  },
  methods: {
    handlerCopy () {
      navigator.clipboard.writeText(this.detailValue).then(() => {
        this.$message.success('复制成功')
      })
    }
  }
}
</script>

<style scoped lang="less">
.detail-dialog {
  background-color: white;
}

</style>
